<html>
<head>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <div class="main">
    <h1>Namespace: joker.time</h1>
    <span class="var-added">v1.0</span>
    <h2>Contents</h2>
    <ul>
      <li>
        <a href="#_summary">Summary</a>
      </li>
      <li>
        <a href="#_index">Index</a>
      </li>
      <li>
        <a href="#_constants">Constants</a>
      </li>
      <li>
        <a href="#_variables">Variables</a>
      </li>
      <li>
        <a href="#_functions">Functions, Macros, and Special Forms</a>
      </li>
    </ul>
    <h2 id="_summary">Summary</h2>
    <p class="var-docstr">Provides functionality for measuring and displaying time.</p>
    <h2 id="_index">Index</h2>
    <ul class="index">
      <li>
  <a href="#add">add</a>
</li>
<li>
  <a href="#add-date">add-date</a>
</li>
<li>
  <a href="#ansi-c">ansi-c</a>
</li>
<li>
  <a href="#day-of-year">day-of-year</a>
</li>
<li>
  <a href="#format">format</a>
</li>
<li>
  <a href="#from-unix">from-unix</a>
</li>
<li>
  <a href="#hour">hour</a>
</li>
<li>
  <a href="#hours">hours</a>
</li>
<li>
  <a href="#in-timezone">in-timezone</a>
</li>
<li>
  <a href="#kitchen">kitchen</a>
</li>
<li>
  <a href="#microsecond">microsecond</a>
</li>
<li>
  <a href="#millisecond">millisecond</a>
</li>
<li>
  <a href="#minute">minute</a>
</li>
<li>
  <a href="#minutes">minutes</a>
</li>
<li>
  <a href="#nanosecond">nanosecond</a>
</li>
<li>
  <a href="#now">now</a>
</li>
<li>
  <a href="#parse">parse</a>
</li>
<li>
  <a href="#parse-duration">parse-duration</a>
</li>
<li>
  <a href="#rfc1123">rfc1123</a>
</li>
<li>
  <a href="#rfc1123-z">rfc1123-z</a>
</li>
<li>
  <a href="#rfc3339">rfc3339</a>
</li>
<li>
  <a href="#rfc3339-nano">rfc3339-nano</a>
</li>
<li>
  <a href="#rfc822">rfc822</a>
</li>
<li>
  <a href="#rfc822-z">rfc822-z</a>
</li>
<li>
  <a href="#rfc850">rfc850</a>
</li>
<li>
  <a href="#round">round</a>
</li>
<li>
  <a href="#ruby-date">ruby-date</a>
</li>
<li>
  <a href="#second">second</a>
</li>
<li>
  <a href="#seconds">seconds</a>
</li>
<li>
  <a href="#since">since</a>
</li>
<li>
  <a href="#sleep">sleep</a>
</li>
<li>
  <a href="#stamp">stamp</a>
</li>
<li>
  <a href="#stamp-micro">stamp-micro</a>
</li>
<li>
  <a href="#stamp-milli">stamp-milli</a>
</li>
<li>
  <a href="#stamp-nano">stamp-nano</a>
</li>
<li>
  <a href="#string">string</a>
</li>
<li>
  <a href="#sub">sub</a>
</li>
<li>
  <a href="#truncate">truncate</a>
</li>
<li>
  <a href="#unix">unix</a>
</li>
<li>
  <a href="#unix-date">unix-date</a>
</li>
<li>
  <a href="#until">until</a>
</li>

    </ul>
    <h2 id="_constants">Constants</h2>
    Constants are variables with <tt>:const true</tt> in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.
    <ul>
      <li>
  <h3 class="Constant" id="ansi-c">ansi-c</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Mon Jan _2 15:04:05 2006</p>
  
  
</li>
<li>
  <h3 class="Constant" id="hour">hour</h3>
  <span class="var-kind Constant">BigInt</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 hour</p>
  
  
</li>
<li>
  <h3 class="Constant" id="kitchen">kitchen</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">3:04PM</p>
  
  
</li>
<li>
  <h3 class="Constant" id="microsecond">microsecond</h3>
  <span class="var-kind Constant">Int</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 microsecond</p>
  
  
</li>
<li>
  <h3 class="Constant" id="millisecond">millisecond</h3>
  <span class="var-kind Constant">Int</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 millisecond</p>
  
  
</li>
<li>
  <h3 class="Constant" id="minute">minute</h3>
  <span class="var-kind Constant">BigInt</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 minute</p>
  
  
</li>
<li>
  <h3 class="Constant" id="nanosecond">nanosecond</h3>
  <span class="var-kind Constant">Int</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 nanosecond</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc1123">rfc1123</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Mon, 02 Jan 2006 15:04:05 MST</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc1123-z">rfc1123-z</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Mon, 02 Jan 2006 15:04:05 -0700</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc3339">rfc3339</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">2006-01-02T15:04:05Z07:00</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc3339-nano">rfc3339-nano</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">2006-01-02T15:04:05.999999999Z07:00</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc822">rfc822</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">02 Jan 06 15:04 MST</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc822-z">rfc822-z</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">02 Jan 06 15:04 -0700</p>
  
  
</li>
<li>
  <h3 class="Constant" id="rfc850">rfc850</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Monday, 02-Jan-06 15:04:05 MST</p>
  
  
</li>
<li>
  <h3 class="Constant" id="ruby-date">ruby-date</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Mon Jan 02 15:04:05 -0700 2006</p>
  
  
</li>
<li>
  <h3 class="Constant" id="second">second</h3>
  <span class="var-kind Constant">Int</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Number of nanoseconds in 1 second</p>
  
  
</li>
<li>
  <h3 class="Constant" id="stamp">stamp</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Jan _2 15:04:05</p>
  
  
</li>
<li>
  <h3 class="Constant" id="stamp-micro">stamp-micro</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Jan _2 15:04:05.000000</p>
  
  
</li>
<li>
  <h3 class="Constant" id="stamp-milli">stamp-milli</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Jan _2 15:04:05.000</p>
  
  
</li>
<li>
  <h3 class="Constant" id="stamp-nano">stamp-nano</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Jan _2 15:04:05.000000000</p>
  
  
</li>
<li>
  <h3 class="Constant" id="unix-date">unix-date</h3>
  <span class="var-kind Constant">String</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"></pre>
  <p class="var-docstr">Mon Jan _2 15:04:05 MST 2006</p>
  
  
</li>

    </ul>
    <h2 id="_variables">Variables</h2>
    <ul>
      (None.)
    </ul>
    <h2 id="_functions">Functions, Macros, and Special Forms</h2>
    <ul>
      <li>
  <h3 class="Function" id="add">add</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(add t d)</code></div>
</pre>
  <p class="var-docstr">Returns the time t+d.</p>
  
  
</li>
<li>
  <h3 class="Function" id="add-date">add-date</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(add-date t years months days)</code></div>
</pre>
  <p class="var-docstr">Returns the time t + (years, months, days).</p>
  
  
</li>
<li>
  <h3 class="Function" id="day-of-year">day-of-year</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.3.4</span>
  <pre class="var-usage"><div><code>(day-of-year t)</code></div>
</pre>
  <p class="var-docstr">Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years.</p>
  
  
</li>
<li>
  <h3 class="Function" id="format">format</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(format t layout)</code></div>
</pre>
  <p class="var-docstr">Returns a textual representation of the time value formatted according to layout,<br>
  which defines the format by showing how the reference time, defined to be<br>
  Mon Jan 2 15:04:05 -0700 MST 2006<br>
  would be displayed if it were the value; it serves as an example of the desired output.<br>
  The same display rules will then be applied to the time value..</p>
  
  
</li>
<li>
  <h3 class="Function" id="from-unix">from-unix</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(from-unix sec nsec)</code></div>
</pre>
  <p class="var-docstr">Returns the local Time corresponding to the given Unix time, sec seconds and<br>
  nsec nanoseconds since January 1, 1970 UTC. It is valid to pass nsec outside the range [0, 999999999].</p>
  
  
</li>
<li>
  <h3 class="Function" id="hours">hours</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(hours d)</code></div>
</pre>
  <p class="var-docstr">Returns the duration (passed as a number of nanoseconds) as a floating point number of hours.</p>
  
  
</li>
<li>
  <h3 class="Function" id="in-timezone">in-timezone</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(in-timezone t tz)</code></div>
</pre>
  <p class="var-docstr">Returns a copy of t representing the same time instant, but with the copy&#39;s timezone information set to tz for display purposes.</p>
  
  
</li>
<li>
  <h3 class="Function" id="minutes">minutes</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(minutes d)</code></div>
</pre>
  <p class="var-docstr">Returns the duration (passed as a number of nanoseconds) as a floating point number of minutes.</p>
  
  
</li>
<li>
  <h3 class="Function" id="now">now</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(now)</code></div>
</pre>
  <p class="var-docstr">Returns the current local time.</p>
  
  
</li>
<li>
  <h3 class="Function" id="parse">parse</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(parse layout value)</code></div>
</pre>
  <p class="var-docstr">Parses a time string.</p>
  
  
</li>
<li>
  <h3 class="Function" id="parse-duration">parse-duration</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(parse-duration s)</code></div>
</pre>
  <p class="var-docstr">Parses a duration string. A duration string is a possibly signed sequence of decimal numbers,<br>
  each with optional fraction and a unit suffix, such as 300ms, -1.5h or 2h45m. Valid time units are<br>
  ns, us (or µs), ms, s, m, h.</p>
  
  
</li>
<li>
  <h3 class="Function" id="round">round</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(round d m)</code></div>
</pre>
  <p class="var-docstr">Returns the result of rounding d to the nearest multiple of m. d and m represent time durations in nanoseconds.<br>
  The rounding behavior for halfway values is to round away from zero. If m &lt;= 0, returns d unchanged.</p>
  
  
</li>
<li>
  <h3 class="Function" id="seconds">seconds</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(seconds d)</code></div>
</pre>
  <p class="var-docstr">Returns the duration (passed as a number of nanoseconds) as a floating point number of seconds.</p>
  
  
</li>
<li>
  <h3 class="Function" id="since">since</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(since t)</code></div>
</pre>
  <p class="var-docstr">Returns the time in nanoseconds elapsed since t.</p>
  
  
</li>
<li>
  <h3 class="Function" id="sleep">sleep</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(sleep d)</code></div>
</pre>
  <p class="var-docstr">Pauses the execution thread for at least the duration d (expressed in nanoseconds).<br>
  A negative or zero duration causes sleep to return immediately.</p>
  
  
</li>
<li>
  <h3 class="Function" id="string">string</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(string d)</code></div>
</pre>
  <p class="var-docstr">Returns a string representing the duration in the form 72h3m0.5s.</p>
  
  
</li>
<li>
  <h3 class="Function" id="sub">sub</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(sub t u)</code></div>
</pre>
  <p class="var-docstr">Returns the duration t-u in nanoseconds.</p>
  
  
</li>
<li>
  <h3 class="Function" id="truncate">truncate</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(truncate d m)</code></div>
</pre>
  <p class="var-docstr">Returns the result of rounding d toward zero to a multiple of m. If m &lt;= 0, returns d unchanged.</p>
  
  
</li>
<li>
  <h3 class="Function" id="unix">unix</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(unix t)</code></div>
</pre>
  <p class="var-docstr">Returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC.</p>
  
  
</li>
<li>
  <h3 class="Function" id="until">until</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(until t)</code></div>
</pre>
  <p class="var-docstr">Returns the duration in nanoseconds until t.</p>
  
  
</li>

    </ul>
  </div>
</body>
<script src="main.js"></script>
</html>
